home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-01 / zendisk1.zip / LST9-4.ASM < prev    next >
Assembly Source File  |  1990-02-15  |  312b  |  15 lines

  1. ;
  2. ; *** Listing 9-4 ***
  3. ;
  4. ; An example of using CMP reg,0 to test for the
  5. ; zero/non-zero status of a register.
  6. ;
  7.     sub    dx,dx    ;set DX to 0, so we don't jump
  8.     call    ZTimerOn
  9.     rept    1000
  10.     cmp    dx,0    ;is DX 0?
  11.     jnz    $+2    ;just jumps to the next line if
  12.             ; Z is not set (never jumps)
  13.     endm
  14.     call    ZTimerOff
  15.